package com.fy.ktorm.controller

import com.fy.ktorm.dao.Departments
import com.fy.ktorm.model.Department
import me.liuwj.ktorm.dsl.eq
import me.liuwj.ktorm.entity.findOne
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@RestController
class DepartmentController {
    @GetMapping("dep/test")
    fun getDep(): Department?{
        return Departments.findOne { it.name eq "tech" }
    }
}